package cn.iocoder.yudao.module.wecom.dal.mysql.cusfollowuser;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wecom.dal.dataobject.cusfollowuser.WeCusFollowUserDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wecom.controller.admin.cusfollowuser.vo.*;

/**
 * 客户跟进人 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface WeCusFollowUserMapper extends BaseMapperX<WeCusFollowUserDO> {

    default PageResult<WeCusFollowUserDO> selectPage(WeCusFollowUserPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WeCusFollowUserDO>()
                .eqIfPresent(WeCusFollowUserDO::getCustomerId, reqVO.getCustomerId())
                .eqIfPresent(WeCusFollowUserDO::getUserId, reqVO.getUserId())
                .eqIfPresent(WeCusFollowUserDO::getQwUserId, reqVO.getQwUserId())
                .eqIfPresent(WeCusFollowUserDO::getQwCustomerId, reqVO.getQwCustomerId())
                .eqIfPresent(WeCusFollowUserDO::getAddWay, reqVO.getAddWay())
                .eqIfPresent(WeCusFollowUserDO::getLevel, reqVO.getLevel())
                .betweenIfPresent(WeCusFollowUserDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WeCusFollowUserDO::getId));
    }



}